package org.example.springoauth2.securitycommon.entity;

import lombok.Getter;
import org.springframework.security.core.userdetails.User;

/**
 * @author hzq
 * @date 2021/9/10 16:21
 */
public class SysUser extends User {

    /*用户信息*/
    @Getter
    private JdbcUser jdbcUser;

    public SysUser(JdbcUser jdbcUser) {
        super(jdbcUser.getUnionId(), jdbcUser.getJdbcUserAuth().getSecret(), jdbcUser.getAuthorities());
        this.jdbcUser = jdbcUser;
    }
}
